import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// element
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// import '@/utils/rem'
import './registerServiceWorker'

const app = createApp(App)
app.use(store)
app.use(router)
app.use(ElementPlus)
app.mount('#app')


// 自定义指令
app.directive('title', {
    created: (el) => {
        const innerText = el.innerText
        el.title = innerText
    },
    updated: (el) => {
        const innerText = el.innerText
        el.title = innerText
    },
})